package com.daedalus.klasaObjekte.Makina;


public class Makina {
    private String modeli;
    private int vitiProdhimit;
    private double cmimi;

    public Makina(String modeli, int vitiProdhimit, double cmimi) {
        this.setModeli(modeli);
        this.setVitiProdhimit(vitiProdhimit);
        this.setCmimi(cmimi);
    }

    public String getModeli() {
        return modeli;
    }

    public void setModeli(String modeli) {
        this.modeli = modeli;
    }

    public int getVitiProdhimit() {
        return vitiProdhimit;
    }

    public void setVitiProdhimit(int vitiProdhimit) {
        this.vitiProdhimit = vitiProdhimit;
    }

    public double getCmimi() {
        return cmimi;
    }

    public void setCmimi(double cmimi) {
        this.cmimi = cmimi;
    }

    public int krahaso(Makina makinaTjeter){
        int fusha =0;
        if (this.getModeli().equals(makinaTjeter.getModeli())){
            System.out.println("Makinat jane i njejti model");
            fusha++;
        }
        else{
            System.out.println("Makinat jane modele te ndryshme");
        }
        if(this.getVitiProdhimit() == makinaTjeter.getVitiProdhimit()){
            System.out.println("Makinat jane i njejti vit");
            fusha++;
        }else {
            System.out.println("Makinat jane vite te ndryshme");
        }
        if(this.getCmimi() == makinaTjeter.getCmimi()){
            System.out.println("Makinat kane cmim te njejte");
            fusha++;
        }else {
            System.out.println("Makinat kane cmime te ndryshme");
        }
        return fusha;
    }
}
